﻿// See https://aka.ms/new-console-template for more information

using A1;

var list = new GenericList<int>();

for (int x = 0; x < 10; x++)
{
    list.Add(x);
}


int max = int.MinValue;
int min = int.MaxValue;
int sum = 0;
list.ForEach(x =>
{
    max = Math.Max(max, x);
    min = Math.Min(min, x);
    sum += x;
});

Console.WriteLine($"Max: {max}");
Console.WriteLine($"Min: {min}");
Console.WriteLine($"Sum: {sum}");

